<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad_10">
<form name="searchform" action="" method="get" >
<input type="hidden" value="order" name="m">
<input type="hidden" value="order" name="c">
<input type="hidden" value="init" name="a">
<input type="hidden" value="<?php echo $_GET['menuid']; ?>" name="menuid">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
		搜索类型：<select name="field">
					<option value="oid">清单号</option>
					<option value="username">会员名</option>
					<option value="title">清单标题</option>
				  </select>
		关键字:<input type="text" name="keywords" value="" /> 
		<input type="submit" name="search" class="button" value="<?php echo L('search')?>" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
<div class="bk10"></div>
<div class="table-list">
<div>注：<span style="color:orange;">黄色标题</span> 表示首选清单</div>
<form action="" method="get">
<input type="hidden" name="m" value="order" />
<input type="hidden" name="c" value="order" />
<input type="hidden" name="a" id="action" value="delete" />
    <table width="100%" cellspacing="0">
        <thead>
		<tr>
		<th width="50"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
		<th width="50">排序</th>
		<th>清单号</th>
		<th>会员名</th>
		<th>标题</th>
		<th>备注</th>
		<th>创建时间</th>
		<th>最后更新时间</th>
		<th>相关操作</th>
		</tr>
        </thead>
        <tbody>
<?php 
if(is_array($data))
	foreach($data as $v){
?>
<tr>
<td width="50" align="center"><input type="checkbox" value="<?php echo $v['id']?>" name="id[]"></td>
<td><input type="text" name="listorder[]" value="<?php echo $v['sort']?>" size="5" /></td>
<td align="center"><?php echo $v['oid']?></td>
<td align="center"><?php echo $v['username']?></td>
<td align="center" <?php if($v['selected']==1) echo 'style="color:orange;"'; ?>><?php echo $v['title']?></td>
<td align="center"><?php echo $v['note']?></td>
<td align="center"><?php echo date('Y-m-d H:i:s', $v['inputtime'])?></td>
<td align="center"><?php echo date('Y-m-d H:i:s', $v['updatetime'])?></td>
<td align="center"><a href="?m=order&c=order&a=detail_list&oid=<?php echo $v['oid']?>">清单详情</a> | <a href="?m=order&c=order&a=delete&id=<?php echo $v['id']?>" onclick="return confirm('<?php echo htmlspecialchars(new_addslashes(L('confirm', array('message'=>$v['title']))))?>')">删除</a></td>
</tr>
<?php }  ?>
</tbody>
</table>
<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>" onclick="return confirm('您确认删除么，该操作无法恢复！')"  /> <input type="submit" class="button" name="dosubmit" onclick="$('#action').val('listorder')" value=" 更新排序 " 
</div>
</from>
</div>
</div>
<div id="pages"><?php echo $pages?></div>
<script type="text/javascript">
window.top.$('#display_center_id').css('display','none');
</script>
</body>
</html>